/*
* Copyright 2018 Shanxi Lu'an Taihang Laihui Net Tech co.,LTD.
*/
package com.laihuichuxing.memento;/**
 * Description:
 *
 * @author: Qinxuefeng
 * @since: 1.0
 * Create Date Time: 2019/1/3 17:26
 * Update Date Time:
 */

public class Originator {
    private String state;

    public Memento createMemento(){
        return new Memento(this.state);
    }
    public void recoverMemento(Memento memento){
        this.setState(memento.getState());
    }
    public void show(){
        System.out.println(state);
    }
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }
}
